<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <meta http-equiv="X-UA-Compatible" content="IE=9"/>
    <link rel="stylesheet" href="../../../lib/layui/css/layui.css">
    <link rel="stylesheet" href="../../static/css/common.css">
    <link rel="stylesheet" href="../../static/css/settings.css">
    <title>角色列表</title>
</head>
<body>
<!--头部-->
<!--<header class="tophead" id="headerWrap"></header>-->
<!--主体-->
<div class="mainbody">
    <h3>角色列表</h3>
    <!--表格-->
    <div class="tables">
        <table lay-filter="roleTable" class="roleTable" lay-data="{id: 'role-table'}"></table>
    </div>
</div>
<!--新增按钮-->
<script type="text/html" id="toolbarRole">
    <div class="layui-btn-container">
        <button type="button" class="layui-btn layui-btn-normal layui-btn-sm addAreaBtn" lay-event="addRoles">新增
        </button>
    </div>
</script>
<!--新增弹框-->
<script type="text/html" id="newAdd">
    <div class="options">
        <form class="layui-form addRoles" lay-filter="AddForm" action="#">
            <div class="infowrap">
                <div class="layui-form-item">
                    <label class="layui-form-label">当前用户角色</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="userRolesId" readonly disabled>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">角色名</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="roleName">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">角色备注</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="roleRemark">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="fr">
                        <button class="layui-btn layui-btn-sm" lay-submit lay-filter="AddForm">确定</button>
                        <button type="cancel" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</script>
<!--行操作-->
<script type="text/html" id="rowOperate">
    <div class=" layui-btn-group">
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑角色</a>
        <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="setRoleMenu">设置菜单权限</a>
        <!--<a class="layui-btn layui-btn-xs" lay-event="del">删除</a>-->
    </div>
</script>
<!--行编辑弹窗  角色 -->
<script type="text/html" id="rowEdit">
    <form class="layui-form editRoles" lay-filter="rowEditForm" action="POST">
        <div class="infowrap">
            <div class="layui-form-item">
                <label class="layui-form-label">当前用户角色</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="userRolesId" readonly disabled>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">角色ID</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="roleId" readonly>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">角色名</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="roleName">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">角色备注</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="roleRemark">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="fr">
                    <button class="layui-btn layui-btn-sm" lay-submit lay-filter="rowEditForm">确定</button>
                    <button type="cancel" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
                </div>
            </div>
        </div>
    </form>
</script>


<!--角色对应菜单弹窗-->
<script type="text/html" id="roleMenu">
    <form class="layui-form editRoles" lay-filter="rowEditForm" action="POST">
        <div class="infowrap">
            <div class="layui-form-item">
                <label class="layui-form-label">当前用户角色</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="userRolesId" readonly disabled>
                </div>
            </div>
            <input type="hidden" class="layui-input" name="roleId" readonly disabled>
            <div class="layui-form-item">
                <label class="layui-form-label">角色名</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="roleName">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">拥有菜单权限</label>
                <div class="layui-input-block rolesToMeun">
                    <input type="checkbox" lay-skin="primary" name="checkAll" title="全选" lay-filter="checkAll"
                           id="checkAll">
                    <input type="checkbox" lay-skin="primary" name="checkReverse" title="反选" lay-filter="checkReverse"
                           id="checkReverse">
                    <br/>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="fr">
                    <button class="layui-btn layui-btn-sm" lay-submit lay-filter="editRoleMenu">确定</button>
                    <button type="cancel" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
                </div>
            </div>
        </div>
    </form>
</script>

</body>
</html>
<script src="../../../lib/layui/layui.js"></script>
<script src="../../static/js/common.js"></script>
<script src="../../static/js/file/role-setting.js"></script>
